﻿
using Blog.Core.EFcore;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Blog.Core.IRepositories
{
    /// <summary>
    /// 工作单元
    /// </summary>
    public interface IUnOfWork
    {
        /// <summary>
        /// 返回受影响的行数
        /// </summary>
        /// <returns></returns>
        Task<int> SaveChanges();
        /// <summary>
        /// 返回上下文
        /// </summary>
        /// <returns></returns>
        DbContext GetDbContext();
    }
}
